import React from "react";
import { Icon } from "@chakra-ui/react";

function Icons(props: { type: "function" | "database" | "storage" | "logs" | "setting" | "info" }) {
  const { type } = props;
  switch (type) {
    case "function":
      return (
        <Icon width="28px" height="28px" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg">
          <path d="M14.7817 5.86136C13.4983 5.74469 12.3667 6.68969 12.25 7.98469L11.9583 11.3564H15.2483V13.6897H11.7483L11.235 19.6047C11.1477 20.5791 10.7564 21.5014 10.1165 22.2414C9.47652 22.9814 8.62025 23.5016 7.66863 23.7286C6.717 23.9555 5.71812 23.8777 4.8131 23.5062C3.90808 23.1347 3.14267 22.4882 2.625 21.658L4.375 19.908C4.76 21.133 6.07833 21.8214 7.29167 21.4247C8.20167 21.1447 8.84333 20.3397 8.925 19.3947L9.415 13.6897H5.915V11.3564H9.625L9.94 7.77469C10.0469 6.54078 10.6387 5.39959 11.5856 4.60134C12.5326 3.80308 13.7575 3.41291 14.9917 3.51636C16.4617 3.64469 17.7917 4.46136 18.5617 5.72136L16.8117 7.47136C16.52 6.57303 15.7267 5.94303 14.7817 5.86136ZM25.9583 15.6147L24.3133 13.9697L21.0117 17.2714L17.71 13.9697L16.0417 15.6147L19.3667 18.9397L16.0417 22.218L17.71 23.863L21.0117 20.5614L24.3133 23.863L25.9583 22.218L22.6567 18.9397L25.9583 15.6147Z" />
        </Icon>
      );

    case "database":
      return (
        <Icon width="28px" height="28px" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg">
          <path d="M13.8715 2.625C8.14117 2.625 3.49985 4.94566 3.49985 7.81083V20.7754C3.49985 23.6406 8.15413 25.9613 13.8715 25.9613C19.5889 25.9613 24.2432 23.6406 24.2432 20.7754V7.81083C24.2432 4.94566 19.6019 2.625 13.8715 2.625ZM21.6503 20.7754C21.6503 21.4236 18.8888 23.3683 13.8715 23.3683C8.85422 23.3683 6.09276 21.4236 6.09276 20.7754V17.8843C8.18006 18.8956 10.9156 19.479 13.8715 19.479C16.8274 19.479 19.563 18.8956 21.6503 17.8843V20.7754ZM21.6503 14.8765C19.9649 16.1082 17.0089 16.886 13.8715 16.886C10.7341 16.886 7.77816 16.1082 6.09276 14.8765V11.2335C7.99856 12.3095 10.773 12.9967 13.8715 12.9967C16.97 12.9967 19.7445 12.3095 21.6503 11.2335V14.8765M13.8715 10.4038C8.85422 10.4038 6.09276 8.45906 6.09276 7.81083C6.09276 7.1626 8.85422 5.21792 13.8715 5.21792C18.8888 5.21792 21.6503 7.1626 21.6503 7.81083C21.6503 8.45906 18.8888 10.4038 13.8715 10.4038Z" />
        </Icon>
      );

    case "storage":
      return (
        <Icon width="28px" height="28px" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg">
          <path d="M21 4.66659V23.3333H6.99999V10.3016L12.635 4.66659H21ZM21 2.33325H11.6667L4.66666 9.33325V23.3333C4.66666 24.6166 5.71666 25.6666 6.99999 25.6666H21C22.2833 25.6666 23.3333 24.6166 23.3333 23.3333V4.66659C23.3333 3.38325 22.2833 2.33325 21 2.33325ZM10.5 8.16659H12.8333V12.8333H10.5V8.16659ZM14 8.16659H16.3333V12.8333H14V8.16659ZM17.5 8.16659H19.8333V12.8333H17.5V8.16659Z" />
        </Icon>
      );

    case "logs":
      return (
        <Icon
          width="28px"
          height="28px"
          viewBox="0 0 28 28"
          fill="none"
          xmlns="http://www.w3.org/2000/svg"
        >
          <path d="M22.1667 5.83333V22.1667H5.83333V5.83333H22.1667ZM22.1667 3.5H5.83333C4.55 3.5 3.5 4.55 3.5 5.83333V22.1667C3.5 23.45 4.55 24.5 5.83333 24.5H22.1667C23.45 24.5 24.5 23.45 24.5 22.1667V5.83333C24.5 4.55 23.45 3.5 22.1667 3.5Z" />
          <path d="M16.3333 19.8334H8.16666V17.5001H16.3333V19.8334ZM19.8333 15.1667H8.16666V12.8334H19.8333V15.1667ZM19.8333 10.5001H8.16666V8.16675H19.8333V10.5001Z" />
        </Icon>
      );

    case "setting":
      return (
        <Icon
          width="32px"
          height="32px"
          viewBox="0 0 32 32"
          fill="none"
          xmlns="http://www.w3.org/2000/svg"
        >
          <g clipPath="url(#clip0_3135_2858)">
            <path d="M25.9067 17.3067C25.96 16.8801 26 16.4534 26 16.0001C26 15.5467 25.96 15.1201 25.9067 14.6934L28.72 12.4934C28.9734 12.2934 29.04 11.9334 28.88 11.6401L26.2134 7.02675C26.0934 6.81341 25.8667 6.69341 25.6267 6.69341C25.5467 6.69341 25.4667 6.70675 25.4 6.73341L22.08 8.06675C21.3867 7.53341 20.64 7.09341 19.8267 6.76008L19.32 3.22675C19.28 2.90675 19 2.66675 18.6667 2.66675H13.3334C13 2.66675 12.72 2.90675 12.68 3.22675L12.1734 6.76008C11.36 7.09341 10.6134 7.54675 9.92003 8.06675L6.60003 6.73341C6.52003 6.70675 6.44003 6.69341 6.36003 6.69341C6.13336 6.69341 5.9067 6.81341 5.7867 7.02675L3.12003 11.6401C2.9467 11.9334 3.0267 12.2934 3.28003 12.4934L6.09336 14.6934C6.04003 15.1201 6.00003 15.5601 6.00003 16.0001C6.00003 16.4401 6.04003 16.8801 6.09336 17.3067L3.28003 19.5067C3.0267 19.7067 2.96003 20.0667 3.12003 20.3601L5.7867 24.9734C5.9067 25.1867 6.13336 25.3067 6.37336 25.3067C6.45336 25.3067 6.53336 25.2934 6.60003 25.2667L9.92003 23.9334C10.6134 24.4667 11.36 24.9067 12.1734 25.2401L12.68 28.7734C12.72 29.0934 13 29.3334 13.3334 29.3334H18.6667C19 29.3334 19.28 29.0934 19.32 28.7734L19.8267 25.2401C20.64 24.9067 21.3867 24.4534 22.08 23.9334L25.4 25.2667C25.48 25.2934 25.56 25.3067 25.64 25.3067C25.8667 25.3067 26.0934 25.1867 26.2134 24.9734L28.88 20.3601C29.04 20.0667 28.9734 19.7067 28.72 19.5067L25.9067 17.3067ZM23.2667 15.0267C23.32 15.4401 23.3334 15.7201 23.3334 16.0001C23.3334 16.2801 23.3067 16.5734 23.2667 16.9734L23.08 18.4801L24.2667 19.4134L25.7067 20.5334L24.7734 22.1467L23.08 21.4667L21.6934 20.9067L20.4934 21.8134C19.92 22.2401 19.3734 22.5601 18.8267 22.7867L17.4134 23.3601L17.2 24.8667L16.9334 26.6667H15.0667L14.8134 24.8667L14.6 23.3601L13.1867 22.7867C12.6134 22.5467 12.08 22.2401 11.5467 21.8401L10.3334 20.9067L8.92003 21.4801L7.2267 22.1601L6.29336 20.5467L7.73336 19.4267L8.92003 18.4934L8.73336 16.9867C8.69336 16.5734 8.6667 16.2667 8.6667 16.0001C8.6667 15.7334 8.69336 15.4267 8.73336 15.0267L8.92003 13.5201L7.73336 12.5867L6.29336 11.4667L7.2267 9.85341L8.92003 10.5334L10.3067 11.0934L11.5067 10.1867C12.08 9.76008 12.6267 9.44008 13.1734 9.21341L14.5867 8.64008L14.8 7.13341L15.0667 5.33341H16.92L17.1734 7.13341L17.3867 8.64008L18.8 9.21341C19.3734 9.45341 19.9067 9.76008 20.44 10.1601L21.6534 11.0934L23.0667 10.5201L24.76 9.84008L25.6934 11.4534L24.2667 12.5867L23.08 13.5201L23.2667 15.0267ZM16 10.6667C13.0534 10.6667 10.6667 13.0534 10.6667 16.0001C10.6667 18.9467 13.0534 21.3334 16 21.3334C18.9467 21.3334 21.3334 18.9467 21.3334 16.0001C21.3334 13.0534 18.9467 10.6667 16 10.6667ZM16 18.6667C14.5334 18.6667 13.3334 17.4667 13.3334 16.0001C13.3334 14.5334 14.5334 13.3334 16 13.3334C17.4667 13.3334 18.6667 14.5334 18.6667 16.0001C18.6667 17.4667 17.4667 18.6667 16 18.6667Z" />
          </g>
          <defs>
            <clipPath id="clip0_3135_2858">
              <rect width="32" height="32" fill="white" />
            </clipPath>
          </defs>
        </Icon>
      );

    case "info":
      return (
        <Icon
          width="14px"
          height="14px"
          viewBox="0 0 16 16"
          fill="none"
          xmlns="http://www.w3.org/2000/svg"
        >
          <path
            d="M7.00017 0.333374C5.68162 0.333374 4.39269 0.724367 3.29636 1.45691C2.20004 2.18945 1.34555 3.23064 0.840969 4.44882C0.336385 5.66699 0.204362 7.00744 0.461597 8.30064C0.718832 9.59385 1.35377 10.7817 2.28612 11.7141C3.21847 12.6464 4.40636 13.2814 5.69956 13.5386C6.99277 13.7958 8.33322 13.6638 9.55139 13.1592C10.7696 12.6547 11.8108 11.8002 12.5433 10.7038C13.2758 9.60751 13.6668 8.31858 13.6668 7.00004C13.6649 5.23253 12.9619 3.53796 11.7121 2.28814C10.4622 1.03832 8.76768 0.335315 7.00017 0.333374ZM7.00017 12.3334C5.94533 12.3334 4.91419 12.0206 4.03712 11.4345C3.16006 10.8485 2.47648 10.0156 2.07281 9.04102C1.66914 8.06648 1.56352 6.99412 1.76931 5.95956C1.9751 4.92499 2.48305 3.97468 3.22893 3.2288C3.97481 2.48292 4.92512 1.97497 5.95968 1.76919C6.99425 1.5634 8.06661 1.66902 9.04114 2.07268C10.0157 2.47635 10.8486 3.15994 11.4347 4.037C12.0207 4.91406 12.3335 5.94521 12.3335 7.00004C12.3317 8.41399 11.7693 9.76952 10.7695 10.7693C9.76964 11.7691 8.41411 12.3316 7.00017 12.3334ZM7.00017 6.66671C6.82336 6.66671 6.65379 6.73695 6.52876 6.86197C6.40374 6.98699 6.3335 7.15656 6.3335 7.33337V9.33337C6.3335 9.51018 6.40374 9.67975 6.52876 9.80478C6.65379 9.9298 6.82336 10 7.00017 10C7.17698 10 7.34655 9.9298 7.47157 9.80478C7.59659 9.67975 7.66683 9.51018 7.66683 9.33337V7.33337C7.66683 7.15656 7.59659 6.98699 7.47157 6.86197C7.34655 6.73695 7.17698 6.66671 7.00017 6.66671ZM7.00017 4.00004C6.83535 4.00004 6.67423 4.04891 6.53719 4.14048C6.40015 4.23205 6.29334 4.3622 6.23027 4.51447C6.16719 4.66674 6.15069 4.8343 6.18285 4.99595C6.215 5.1576 6.29437 5.30609 6.41091 5.42263C6.52745 5.53917 6.67594 5.61854 6.83759 5.65069C6.99924 5.68285 7.1668 5.66635 7.31907 5.60327C7.47134 5.5402 7.60149 5.43339 7.69306 5.29635C7.78463 5.15931 7.8335 4.99819 7.8335 4.83337C7.8335 4.61236 7.7457 4.4004 7.58942 4.24412C7.43314 4.08784 7.22118 4.00004 7.00017 4.00004Z"
            fill="#00A9A6"
          />
        </Icon>
      );

    default:
      break;
  }
  return <div>Icons</div>;
}

export default Icons;
